home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_lag_temexitdoor.cog < prev    next >
Text File  |  1999-11-15  |  3KB  |  112 lines

  1. # Jones 3D Cog Script
  2. #
  3. #
  4. # [DS]
  5. #
  6. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  7. #===============================================================================
  8.  
  9.  
  10. symbols
  11.  
  12.     message     startup
  13.     message     activated
  14.     message        timer
  15.  
  16.     thing       switch0         
  17.     thing        door0
  18.     thing        door1
  19.     thing        indy                nolink    desc=cutscene actor
  20.     thing        campos    
  21.     
  22.     thing        player                    local
  23.     sector      doorsector                    local
  24.     int        doorstatus                    local
  25.     int        movestatus                    local
  26.     keyframe    in_activate=in_uw_pullswitch.key    local 
  27.     cog        hints
  28.     sound        doorsnd=teo_stonebar_slide_c.wav    local
  29.     sound        doorstop=teo_teobut_pull_c.wav    local
  30.     int        doormove                    local
  31.     int        actit                        local
  32.     int        curcam                    local
  33.     flex        checkstatus                    local
  34.  
  35. end
  36.  
  37. code
  38.  
  39. #========================================================================================
  40. startup:
  41.     player = GetLocalPlayerThing();
  42.     doorsector = GetThingSector(door0);
  43.     SetSectorAdjoins(doorsector, 0);
  44.     return;
  45.     
  46. #========================================================================================
  47. activated:
  48.     if (GetSenderRef() != switch0) return;
  49.     call checkstatus;
  50.     if(movestatus) return;
  51.     curCam = GetCurrentCamera();
  52.     if(doorstatus == 0)
  53.     {                                      
  54.     SetSectorAdjoins(doorsector, 1);
  55.     SetThingFlags(player, 0x80000);
  56.     SetActorFlags(player, 0x200000);
  57.     CopyPlayerHolsters(player, indy);
  58.     StartCutscene(1);
  59.     ClearThingFlags(indy, 0x80000);
  60.     SetCameraLookInterp(2, 0);            # turns off interp to lookthing.
  61.     SetCameraFocus(2, campos);
  62.     SetCameraSecondaryFocus(2, indy);
  63.     SetCurrentCamera(2);
  64.     SetCameraFOV(45, 0, 0);                
  65.     SetTimer(1.5);
  66.     actit = PlayKey(indy, in_activate, 4, 0x12, 1);
  67.         SetCameraLookInterp(2, 1);
  68.         SetCameraInterpSpeed(2, 2);
  69.         sleep(0.1);
  70.         SetCameraSecondaryFocus(2, door0);
  71.         sleep(1.5);
  72.     movetoframe(door0, 1, 0.5);
  73.     movetoframe(door1, 1, 0.5);
  74.     doormove=PlaySoundThing(doorsnd, door0, 1, 45, 60, 1);
  75.     WaitForStop(door0);
  76.     StopSound(doormove, 0.1);
  77.     PlaySoundThing(doorstop, door0, 1, 45, 60, 0);
  78.     SetCameraLookInterp(2, 0);            #reset default
  79.     SetCameraFOV(90, 0, 0);                #reset default
  80.     SetCameraInterpSpeed(2, 1);            #reset default
  81.     SetCurrentCamera(curCam);
  82.     SetThingFlags(indy, 0x80000);
  83.     ClearActorFlags(player, 0x200000);
  84.     ClearThingFlags(player, 0x80000);
  85.     EndCutscene();
  86.  
  87.         # Send message to hint cog
  88.     SendMessageEx(hints, user6, 1, 0, 0, 0);        #param0=1; solved.
  89.  
  90.     }
  91.     return;
  92.     
  93. #========================================================================================
  94. timer:
  95.     MoveToFrame(switch0, 1, 0.5);
  96.     return;
  97.  
  98. #========================================================================================
  99. checkstatus:
  100.     moveStatus = 0;
  101.     doorStatus = 0;
  102.     if (door0 >= 0) {
  103.             moveStatus = moveStatus + IsThingMoving(door0);
  104.             doorStatus = doorStatus + GetCurFrame(door0);
  105.         }
  106.     return;
  107.     
  108.  
  109. #========================================================================================
  110.  
  111. end
  112.